The following Visual Basic .NET example creates two arrays and passes them to IDL using the SetIDLVariable method. An ExecuteString command then multiplies the two arrays and GetIDLVariable returns the result to the COM application. The product of the array multiplication is printed to the console window.
COM_IDL_connectLib 1.0 Type Library.Note: The text file for this example, com_export_arrays_doc.txt, is located in the examples/doc/bridges/COM subdirectory of the IDL distribution. This Visual Basic .NET code can be copied from the text file and adopted for use in your COM environment.
Building and running this program outputs the following to the console window.